package com.hpjpw.ido.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 评论提醒对象 ido_message_remind
 *
 * @author hpj
 * @date 2021-04-04
 */
@ApiModel("MessageRemindDomain")
public class MessageRemind extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ApiModelProperty("${comment}")
    private Long id;

    /**
     * 接收者id
     */
    @Excel(name = "接收者id")
    @ApiModelProperty("接收者id")
    private Long receiveId;

    /**
     * 评论id
     */
    @Excel(name = "评论id")
    @ApiModelProperty("评论id")
    private Long commentId;

    /**
     * 动态id
     */
    @Excel(name = "动态id")
    @ApiModelProperty("动态id")
    private Long momentId;

    /**
     * 评论者昵称
     */
    @Excel(name = "评论者昵称")
    @ApiModelProperty("评论者昵称")
    private String fromName;

    /**
     * 评论者id
     */
    @Excel(name = "评论者id")
    @ApiModelProperty("评论者id")
    private Long fromId;

    /**
     * 评论时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("评论时间")
    private Date time;

    /**
     * 动态类型
     */
    @Excel(name = "动态类型")
    @ApiModelProperty("动态类型")
    private String type;

    /**
     * 阅读状态
     */
    @Excel(name = "阅读状态")
    @ApiModelProperty("阅读状态")
    private String status;

    public MessageRemind() {
    }

    public MessageRemind(Long receiveId, Long commentId, Long momentId, String fromName, Long fromId, Date time, String type, String status) {
        this.receiveId = receiveId;
        this.commentId = commentId;
        this.momentId = momentId;
        this.fromName = fromName;
        this.fromId = fromId;
        this.time = time;
        this.type = type;
        this.status = status;
    }

    public MessageRemind(CheerComment cheerComment, String fromName) {
        this.receiveId = cheerComment.getToId();
        this.commentId = cheerComment.getId();
        this.momentId = cheerComment.getMomentId();
        this.fromName = fromName;
        this.fromId = cheerComment.getFromId();
        this.time = cheerComment.getTime();
        this.type = "1";
        this.status = "0";
    }

    public MessageRemind(AnonymousComment anonymousComment, String fromName) {
        this.receiveId = anonymousComment.getToId();
        this.commentId = anonymousComment.getId();
        this.momentId = anonymousComment.getMomentId();
        this.fromName = fromName;
        this.fromId = anonymousComment.getFromId();
        this.time = anonymousComment.getTime();
        this.type = "0";
        this.status = "0";
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(Long receiveId) {
        this.receiveId = receiveId;
    }

    public Long getCommentId() {
        return commentId;
    }

    public void setCommentId(Long commentId) {
        this.commentId = commentId;
    }

    public Long getMomentId() {
        return momentId;
    }

    public void setMomentId(Long momentId) {
        this.momentId = momentId;
    }

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public Long getFromId() {
        return fromId;
    }

    public void setFromId(Long fromId) {
        this.fromId = fromId;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("receiveId", getReceiveId())
                .append("commentId", getCommentId())
                .append("momentId", getMomentId())
                .append("fromName", getFromName())
                .append("fromId", getFromId())
                .append("time", getTime())
                .append("type", getType())
                .append("status", getStatus())
                .toString();
    }
}
